<%@ include file="/jsp/common/tagLibs.jsp"%>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/admin/factorDetails.js"></script>
<DIV class=content_division>
	<DIV class=content_container>
	<DIV class=cleardiv></DIV>
		<DIV class=content_left_shadow>
			<DIV class=content_right_shadow>
				<DIV class=under_flash_shadow></DIV>
				<!-- CONTENT START -->
				<DIV class=content_inner_container>
						   <form:form id="columnarForm" commandName="factorsVO">
							<DIV class=cleardiv></DIV>
							<DIV class=maincol style="width:100%;">
							<DIV class=button_orange>
								<DIV class=bo_left></DIV>
								<DIV class=bo_mid>Factors</DIV>
								<DIV class=bo_right></DIV>
							</DIV>
							<div style="margin-top:20px;">
								<input value="Add Factors" type="submit" class="button" id="addBtn"/>
								<input value="Update Factors" type="submit" class="button" id="updateBtn"/>							
								<table class="table-css">
									<thead>
										<tr><th width="3%">S.No.</th><th width="85%">Factors</th><th width="5%"></th></tr>
									</thead>
									<tbody>
										<c:forEach items="${factorsVO.factors}" var="factor" varStatus="status">
										<tr style="height:50px;">
											<td>${status.count}</td>
											<td>
												<input id="factors_${status.index}_factorname" type="text" maxlength="50" 
													name="factors[${status.index}].factorname" value="${factor.factorname}" class="input jFocus"/>
													
												<form:select id="factors_${status.index}" cssStyle="width:100px;display:inline;"  path="factors[${status.index}].factortype" items="${factorTypes}" onchange="showHideUnits(${status.index});"></form:select>

												<input id="factors_${status.index}_units" type="text"
													name="factors[${status.index}].units" value="${factor.units}" class="input jFocus"/>												<!--
													
												<input style="width:100px;display:inline;" id="factors_${status.index}_factortype" type="text"
													name="factors[${status.index}].factortype" value="${factor.factortype}"/>
											--></td>
											<td>
											<a href="${pageContext.request.contextPath}/factordetails/delete.html?factorid=${factor.factorid}" title="Delete" class="delete nostyle">&nbsp;</a>											
											</td>
										</tr>
										</c:forEach>
									</tbody>
								</table>
							</div>
							</div>
							<DIV class=cleardiv></DIV>
							</form:form>  
							<br/><br/><br/>
						</DIV>
				<!-- CONTENT END -->
			</DIV>
		</DIV>
		<DIV class=cleardiv></DIV>
	</DIV>
</DIV>